// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * NewsletterSubscriber generated by hbm2java
 */
@Entity
@Table(name = "newsletter_subscriber", catalog = "magento")
public class NewsletterSubscriber implements java.io.Serializable {

	private Integer subscriberId;
	private CoreStore coreStore;
	private Date changeStatusAt;
	private int customerId;
	private String subscriberEmail;
	private int subscriberStatus;
	private String subscriberConfirmCode;
	private Set newsletterProblems = new HashSet(0);
	private Set newsletterQueueLinks = new HashSet(0);

	public NewsletterSubscriber() {
	}

	public NewsletterSubscriber(int customerId, String subscriberEmail,
			int subscriberStatus) {
		this.customerId = customerId;
		this.subscriberEmail = subscriberEmail;
		this.subscriberStatus = subscriberStatus;
	}

	public NewsletterSubscriber(CoreStore coreStore, Date changeStatusAt,
			int customerId, String subscriberEmail, int subscriberStatus,
			String subscriberConfirmCode, Set newsletterProblems,
			Set newsletterQueueLinks) {
		this.coreStore = coreStore;
		this.changeStatusAt = changeStatusAt;
		this.customerId = customerId;
		this.subscriberEmail = subscriberEmail;
		this.subscriberStatus = subscriberStatus;
		this.subscriberConfirmCode = subscriberConfirmCode;
		this.newsletterProblems = newsletterProblems;
		this.newsletterQueueLinks = newsletterQueueLinks;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "subscriber_id", unique = true, nullable = false)
	public Integer getSubscriberId() {
		return this.subscriberId;
	}

	public void setSubscriberId(Integer subscriberId) {
		this.subscriberId = subscriberId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "store_id")
	public CoreStore getCoreStore() {
		return this.coreStore;
	}

	public void setCoreStore(CoreStore coreStore) {
		this.coreStore = coreStore;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "change_status_at", length = 19)
	public Date getChangeStatusAt() {
		return this.changeStatusAt;
	}

	public void setChangeStatusAt(Date changeStatusAt) {
		this.changeStatusAt = changeStatusAt;
	}

	@Column(name = "customer_id", nullable = false)
	public int getCustomerId() {
		return this.customerId;
	}

	public void setCustomerId(int customerId) {
		this.customerId = customerId;
	}

	@Column(name = "subscriber_email", nullable = false, length = 150)
	public String getSubscriberEmail() {
		return this.subscriberEmail;
	}

	public void setSubscriberEmail(String subscriberEmail) {
		this.subscriberEmail = subscriberEmail;
	}

	@Column(name = "subscriber_status", nullable = false)
	public int getSubscriberStatus() {
		return this.subscriberStatus;
	}

	public void setSubscriberStatus(int subscriberStatus) {
		this.subscriberStatus = subscriberStatus;
	}

	@Column(name = "subscriber_confirm_code", length = 32)
	public String getSubscriberConfirmCode() {
		return this.subscriberConfirmCode;
	}

	public void setSubscriberConfirmCode(String subscriberConfirmCode) {
		this.subscriberConfirmCode = subscriberConfirmCode;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "newsletterSubscriber")
	public Set getNewsletterProblems() {
		return this.newsletterProblems;
	}

	public void setNewsletterProblems(Set newsletterProblems) {
		this.newsletterProblems = newsletterProblems;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "newsletterSubscriber")
	public Set getNewsletterQueueLinks() {
		return this.newsletterQueueLinks;
	}

	public void setNewsletterQueueLinks(Set newsletterQueueLinks) {
		this.newsletterQueueLinks = newsletterQueueLinks;
	}

}
